package com.wq.wrongquestion.serviceimpl.geo;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wq.wrongquestion.entity.geo.GeographyEntity;
import com.wq.wrongquestion.mapper.geo.GeographyMapper;
import com.wq.wrongquestion.service.geo.GeographyService;

@Component
public class GeographyServiceimpl implements GeographyService{
    
    @Autowired
    public GeographyMapper GeographyMapper;
    @Override
    @Transactional
    public String getGeographyZjnm(String zjID) {
        String zjNm=GeographyMapper.getGeographyZjnm(zjID);
        return zjNm;
    }
    @Override
    @Transactional
    public List<String> getGeographyZjID() {
       List<String> allZjID=GeographyMapper.getGeographyZjID();
       return allZjID;
    }
    @Override
    @Transactional
    public List<String> getGeographyZj() {
        List<String> zjInfo=GeographyMapper.getGeographyZj();
        return zjInfo;
    }
    @Override
    @Transactional
    public void insGeography(GeographyEntity GeographyEntity) {
        GeographyMapper.insGeography(GeographyEntity);
    }
    @Override
    @Transactional
    public PageInfo<GeographyEntity> getGeography(Integer pageNumer,Integer pageSize,GeographyEntity GeographyEntity) {
        PageHelper.startPage(pageNumer, pageSize);
        List<GeographyEntity> Geography=GeographyMapper.getGeography(GeographyEntity);
        PageInfo<GeographyEntity> pageGeography=new PageInfo<>(Geography);
        return pageGeography;
    }

    @Override
    @Transactional
    public List<GeographyEntity> getGeographyByID(Integer id) {
        List<GeographyEntity> Geography=GeographyMapper.getGeographyByID(id);
        return Geography;
    }
    @Override
    @Transactional
    public Integer updGeography(GeographyEntity GeographyEntity) {
        return GeographyMapper.updGeography(GeographyEntity);
    }
    @Override
    @Transactional
    public Integer delGeography(Integer id) {
        return GeographyMapper.delGeography(id);
    }
    
}
